<?php

namespace App\Models;

use App\Models\Business\ComplainType;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class CustomerComplaint extends Model
{
    use HasFactory;

    protected $guarded = [];
    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format('Y/m/d H:i:s');
    }
    public function customer(){
        return $this->hasOne(CustomerManager::class,'id','customer_id');
    }
    public function shop(){
        return $this->hasOne(ShopManager::class,'id','shop_id');
    }
    public function complainType(){
        return $this->hasOne(ComplainType::class,'id','complain_types_id');
    }

}
